import paramiko

def get_server_status(hostname, port, username, password, command):
    """
    通过 paramiko 获取远程服务器的状态
    """
    client = paramiko.SSHClient()
    client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
    try:
        client.connect(hostname=hostname, port=port, username=username, password=password)
        stdin, stdout, stderr = client.exec_command(command)
        output = stdout.read().decode().strip()
        print(output,88888888888888888888888888888888)
        return output
    except Exception as e:
        return str(e)
    finally:
        client.close()
